package com.google.code.p.restrpc.http;

/**
 * @author dz
 */
public interface HttpResponseCallback {
    
    /**
     * Parse the status line of response,if 4x,5x meeted,throws corresponding
     * exception
     * 
     * @param response
     * @return
     */
    public void handleError(HttpClientResponse response);
    
    /**
     * Parse the body of response, and convert to corresponding object according
     * to the content-type-value of http header
     * 
     * @param response
     * @return
     */
    public Object doWith(HttpClientResponse response);
    
}
